package edu.nctu.csie.jichang.database.model.cell;


public class DBSchema extends AbstractContainer<DBTable>{

	public DBSchema(String pName){
		super(pName);
	}
	
	public String getSchemaName(){
		return getName();
	}
	public void setSchemaName(String pName){
		setName(pName);
	}
	public void addTable(String pKey,DBTable pTable){
		addChild(pKey, pTable);
	}
	public DBTable[] getAllTables(){
		return getChildren().values().toArray(new DBTable[0]);
	}
	public DBTable getTable(String pTable){
		return (DBTable)getChild(pTable);
	}
	public String[] getTableNames(){
		return getAllNames();
	}
	public void removeTable(String pName){
		removeChild(pName);
	}
	public boolean hasTable(String pName){
		return hasChild(pName);
	}
}
